mq_connectiontest : mq_connectiontest.cc ../mqcommon/mq_proto.pb.cc ../mqcommon/mq_msg.pb.cc
	#                          指定protobuf的路径                                         指定高版本。
	g++ -o $@ $^ -std=c++11 -g -L/usr/local/bin/ -L../mqthird/lib -I../mqthird/include/ /usr/local/lib/libprotobuf.so.31 -lgtest -lsqlite3 -pthread -lmuduo_net -lmuduo_base -lz

mq_channeltest : mq_channeltest.cc ../mqcommon/mq_proto.pb.cc ../mqcommon/mq_msg.pb.cc
	#                          指定protobuf的路径                                         指定高版本。
	g++ -o $@ $^ -std=c++11 -g -L/usr/local/bin/ -L../mqthird/lib -I../mqthird/include/ /usr/local/lib/libprotobuf.so.31 -lgtest -lsqlite3 -pthread -lmuduo_net -lmuduo_base -lz
	#g++ -o $@ $^ -std=c++11 -g -L/usr/bin/ -L../mqthird/lib -I../mqthird/include/ -lprotobuf -lgtest -lsqlite3

mq_consumertest:mq_consumertest.cpp ../mqcommon/mq_msg.pb.cc
	g++ -o $@ $^ -std=c++11 -g -L/usr/bin/ -lprotobuf -lgtest -lsqlite3

mq_routertest:mq_routertest.cc
	g++ -o $@ $^ -std=c++11 -g -L/usr/local/bin/lib -lprotobuf -lgtest -lsqlite3

mq_hosttest:mq_hosttest.cc ../mqcommon/mq_msg.pb.cc
	g++ -o $@ $^ -std=c++11 -g -L/usr/local/bin/lib -lprotobuf -lgtest -lsqlite3

mq_messagetest : mq_messagetest.cc ../mqcommon/mq_msg.pb.cc
	g++ -o $@ $^ -std=c++17 -g -L/usr/local/bin/lib -lprotobuf -lgtest -lsqlite3

mq_bindtest:mq_bindtest.cc
	g++ -o $@ $^ -std=c++17 -g -lsqlite3 -lgtest -lprotobuf

mq_queuetest:mq_queuetest.cpp
	g++ -o $@ $^ -std=c++17 -g -lgtest -lsqlite3 -lprotobuf

mq_exchangetest:mq_exchangetest.cpp 
	g++ -o $@ $^ -std=c++17 -g -lgtest -lsqlite3 -lprotobuf 

test_helper:test_helper.cc
	g++ -o $@ $^ -std=c++11 -g

.PHONY:clean
clean:
	rm -fr mq_connectiontest data
	#rm -f mq_channeltest
	#rm -fr mq_routertest
	#rm -fr mq_hosttest data
	#rm -fr mq_messagetest #test-message
	#rm -f test_helper mq_exchangetest test-exchange.db mq_queuetest test-queue.db test-queue.db mq_bindtest test-bind.db
